//
//  CBDAddressBookModel.m
//  addressBookTest
//
//  Created by huangyang on 15/8/24.
//  Copyright (c) 2015年 sheepyellow. All rights reserved.
//

#import "MUCAddressBookModel.h"

@implementation MUCAddressBookModel

-(NSString*)fullName
{
    if(!_fullName)
    {
        _fullName=[NSString stringWithFormat:@"%@%@",self.lastName,self.firstName];
    }
    return _fullName;
}

-(NSUInteger)hash
{
    return self.fullName.hash;
}

-(BOOL)isEqualToModel:(MUCAddressBookModel*)model
{
    if(!model)
        return NO;
    if(self==model)
        return YES;
    if([self isEqual:model])
        return YES;
    if([self.fullName isEqualToString:model.fullName])
        return YES;
    return NO;
}

@end
